<?php

use Illuminate\Database\Seeder;

class RoleSeeder extends Seeder
{
    private $rules = array([
        'name' => 'admin',
        'slug' => 'admin',
        'description' => '超级管理',
        'level' => '6'
    ],[
        'name' => 'guide',
        'slug' => 'guide',
        'description' => '导医',
        'level' => '5'
    ],[
        'name' => 'doctor',
        'slug' => 'doctor',
        'description' => '医生',
        'level' => '3'
    ],[
            'name' => 'business',
            'slug' => 'business',
            'description' => '经营',
            'level' => '3'
    ],[
            'name' => 'consult',
            'slug' => 'consult',
            'description' => '咨询',
            'level' => '3'
     ],[
            'name' => 'sem',
            'slug' => 'sem',
            'description' => '竞价',
            'level' => '3'
     ]);

    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        foreach ($this->rules as $v) {
            \App\Entities\Role::create($v);
        }
    }
}
